#include "PyrolysisRhoADKernel.h"
#include<iostream>
using std::cout;
using std::endl;
registerMooseObject("TrilobitaApp", PyrolysisRhoADKernel);
template<>
InputParameters validParams<PyrolysisRhoADKernel>()
{
	InputParameters params = validParams<ADTimeDerivative>();
	params.addParam<std::string>("rho_name", "Material property density name");
	return params;
}

PyrolysisRhoADKernel::PyrolysisRhoADKernel(const InputParameters& parameters) :
	ADTimeDerivative(parameters),
	_rho_name(isParamValid("rho_name") ? getParam<std::string>("rho_name") : ""),
	_pyrolysis_source(getADMaterialProperty<Real>("pyrolysis_source" + _rho_name))
{
}

ADReal
PyrolysisRhoADKernel::precomputeQpResidual()
{
	return _u_dot[_qp] - _pyrolysis_source[_qp];
}



